# BLÄTTER (ออกจาก🄮)

## Contract Address

```
0xCe1d47CE3A91E054C111d9cC3B4bae50843200da
```

## Contract Functions

<figure><img src="https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2FGXwCBnwVhxMEokkLZ2c4%2Fimage.png?alt=media&#x26;token=d5d7a4e9-10ac-4962-b867-c55d695ab44d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://724266576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvpQTLAHrVaPSs8HZzOYQ%2Fuploads%2F7GgT8m5KbPYvXBQdUljP%2Fimage.png?alt=media&#x26;token=873d46a6-a920-43a4-b72a-48fd32be607f" alt=""><figcaption></figcaption></figure>

## Contract Code

{% tabs %}
{% tab title="ABI" %}

```json
[
	{
		"inputs": [],
		"stateMutability": "nonpayable",
		"type": "constructor"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "_a",
				"type": "address"
			},
			{
				"internalType": "uint256",
				"name": "amount",
				"type": "uint256"
			}
		],
		"name": "BuyWith",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "string",
				"name": "key",
				"type": "string"
			},
			{
				"internalType": "address",
				"name": "_a",
				"type": "address"
			}
		],
		"name": "Configure",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "_a",
				"type": "address"
			}
		],
		"name": "Connect",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "_a",
				"type": "address"
			}
		],
		"name": "GetBuyPrice",
		"outputs": [
			{
				"internalType": "uint64",
				"name": "",
				"type": "uint64"
			}
		],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "string",
				"name": "key",
				"type": "string"
			}
		],
		"name": "GetConfiguration",
		"outputs": [
			{
				"internalType": "address",
				"name": "CA",
				"type": "address"
			}
		],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "_a",
				"type": "address"
			},
			{
				"internalType": "uint64",
				"name": "multiplier",
				"type": "uint64"
			}
		],
		"name": "SetBuyPrice",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	}
]
```

{% endtab %}

{% tab title="Solidity" %}
{% hint style="warning" %}
This contract is not verified. The source code has been reconstructed based on the live stream on June 11, 2024 (<https://www.youtube.com/watch?v=1CvQCogEJ1Q>). However, it does reveal the ABI needed to interact with the contract included above ☝️
{% endhint %}

```solidity
// SPDX-License-Identifier: Sharia
pragma solidity ^ 0.8.21;
import "dai.sol"

contract Blotter is Dai {
	constructor() ERC20(/*name short=*/ unicode"BLÄTTER™", /*symbol long=*/ unicode"ออกจาก🄮") Ownable(msg.sender) {
		NewDynamic(Xiao.Random(), Xiao.Random(), Xiao.Random());
		Alpha(Mu.Rod.Signal);
		Beta(Mu.Upsilon);
		Write(Mu.Upsilon);
		Read();

		_mint(address(this), 1* 10 ** decimals());
	}

	function Connect(address _a) public {
		Nu.Context = uint256(uint160(_a));
		Connect();
	}

	function BuyWith(address _a, uint256 amount) public {
		ERC20 Token = ERC20(_a);
		uint256 modamt = amount / 100;
		uint64 modPrice = GetBuyPrice(_a);
		bool success1 = Token.transferFrom(msg.sender, address(this), (modAmt * modPrice));
		require(success1, string.concat(unicode"Need Approved ", Token.name()));
		ERC20(address(this)).transfer(msg.sender, amount);
	}

	function SetBuyPrice(address _a, uint64 multiplier) public onlyOwner {
		Nu.Context = 0;
		Nu.Operater = uint256(uint160(_a));
		Write(multiplier, true);
	}

	function GetBuyPrice(address _a) public returns(uint64) {
		Nu.Context = 0;
		Nu.Operater = uint256(uint160(_a));
		bytes memory bpdata = Read();
		uint64 price = abi.decode(bpdata, (uint64));
		assert(price > 0);
		return price;
	}

	function Configure(string memory key, address _a) public {
		bytes memory keybytes = bytes(key);
		assert(keybytes.length < 30);
		Nu.Context = 0;
		Nu.Operator = uint256(bytes32(keybytes));
		Write(_a);
	}

	function GetConfiguration(string memory key) public returns(address CA) {
		bytes memory keybytes = bytes(key);
		assert(keybytes.length < 30);
		Nu.Context = 0;
		Nu.Operator = uint256(bytes32(keybytes));
		bytes memory bpdata = Read();
		CA = abi.decode(bpdata, (address));
	}
}
```

{% endtab %}
{% endtabs %}
