Some checks failed
Deploy / deploy (push) Has been cancelled
Private Ethereum chain (Clique PoA, chain ID 8888) with ERC-20 token (0 decimals, 1 AFC = 1 diamond) bridging casino balances on-chain so players can view tokens in MetaMask. - Geth v1.13.15 node with 5s block time, zero gas cost - AfterCoin ERC-20 contract with owner-gated mint/burn/bridgeTransfer - Bridge API (Express + ethers.js + SQLite) with register, deposit, withdraw, balance, and wallet endpoints - Nonce queue for serial transaction safety - Auto-deploys contract on first boot - Updated mainframe Lua with diff-based on-chain sync (pcall fallback) - Updated card generator Lua with wallet info display Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
357 lines
12 KiB
JSON
357 lines
12 KiB
JSON
{
|
|
"contractName": "AfterCoin",
|
|
"abi": [
|
|
{
|
|
"inputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "constructor"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "required",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "available",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "InsufficientAllowance",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "required",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "available",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "InsufficientBalance",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "NotOwner",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "ZeroAddress",
|
|
"type": "error"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "owner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Approval",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "value",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "Transfer",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "tokenOwner",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "allowance",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "spender",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "account",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "balanceOf",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "bridgeTransfer",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "burnFrom",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "decimals",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "mint",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "name",
|
|
"outputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "owner",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "symbol",
|
|
"outputs": [
|
|
{
|
|
"internalType": "string",
|
|
"name": "",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "totalSupply",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "from",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transferFrom",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"bytecode": "0x6080604052348015600f57600080fd5b50600380546001600160a01b031916331790556108ac806100316000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063671afbce1161008c5780638da5cb5b116100665780638da5cb5b146101c657806395d89b41146101f1578063a9059cbb14610210578063dd62ed3e1461022357600080fd5b8063671afbce1461017757806370a082311461018a57806379cc6790146101b357600080fd5b806306fdde03146100d4578063095ea7b31461010b57806318160ddd1461012e57806323b872dd14610140578063313ce5671461015357806340c10f1914610162575b600080fd5b60408051808201909152600981526820b33a32b921b7b4b760b91b60208201525b6040516101029190610714565b60405180910390f35b61011e61011936600461077e565b61025c565b6040519015158152602001610102565b6000545b604051908152602001610102565b61011e61014e3660046107a8565b610273565b60405160008152602001610102565b61017561017036600461077e565b6102f9565b005b6101756101853660046107a8565b6103d3565b6101326101983660046107e5565b6001600160a01b031660009081526001602052604090205490565b6101756101c136600461077e565b61040e565b6003546101d9906001600160a01b031681565b6040516001600160a01b039091168152602001610102565b60408051808201909152600381526241464360e81b60208201526100f5565b61011e61021e36600461077e565b61052e565b610132610231366004610807565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600061026933848461053b565b5060015b92915050565b6001600160a01b038316600090815260026020908152604080832033845290915281205460001981146102e357828110156102d657604051630c95cf2760e11b815233600482015260248101849052604481018290526064015b60405180910390fd5b6102e3853385840361053b565b6102ee8585856105e2565b506001949350505050565b6003546001600160a01b03163314610324576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b03821661034b5760405163d92e233d60e01b815260040160405180910390fd5b8060008082825461035c9190610850565b90915550506001600160a01b03821660009081526001602052604081208054839290610389908490610850565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6003546001600160a01b031633146103fe576040516330cd747160e01b815260040160405180910390fd5b6104098383836105e2565b505050565b6003546001600160a01b03163314610439576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b0382166104605760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b038216600090815260016020526040902054818110156104b35760405163db42144d60e01b81526001600160a01b038416600482015260248101839052604481018290526064016102cd565b6001600160a01b03831660009081526001602052604081208383039055805483919081906104e2908490610863565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050565b60006102693384846105e2565b6001600160a01b0383166105625760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382166105895760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101610521565b6001600160a01b0383166106095760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382166106305760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b038316600090815260016020526040902054818110156106835760405163db42144d60e01b81526001600160a01b038516600482015260248101839052604481018290526064016102cd565b6001600160a01b038085166000908152600160205260408082208585039055918516815290812080548492906106ba908490610850565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161070691815260200190565b60405180910390a350505050565b602081526000825180602084015260005b818110156107425760208186018101516040868401015201610725565b506000604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b038116811461077957600080fd5b919050565b6000806040838503121561079157600080fd5b61079a83610762565b946020939093013593505050565b6000806000606084860312156107bd57600080fd5b6107c684610762565b92506107d460208501610762565b929592945050506040919091013590565b6000602082840312156107f757600080fd5b61080082610762565b9392505050565b6000806040838503121561081a57600080fd5b61082383610762565b915061083160208401610762565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561026d5761026d61083a565b8181038181111561026d5761026d61083a56fea2646970667358221220385d4e7aa6f29433bdf52f6b52498c4501151f35e2ecf304acc5bb0007e5327264736f6c63430008220033"
|
|
} |