Verified contractPartialMIT
SwarmOracle
Address0xfbd1f85ea9ea14432ab3ade43d2ff01bf752ccea
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.26
- Same code
Only this contract
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- Via IR
- yes
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,407,204
- Creation transaction
- 0xc83be4d330…608cbe4387
Read10
- asks(uint256) → (bytes32)
- attester() → (address)
- client() → (address)
- decode(bytes32) → (bool,uint16)
- digest(tuple) → (bytes32)
- imd() → (address)
- intake() → (address)
- pending(bytes32) → (bytes32)
- price() → (uint256)
- rules() → (address)
Write3
- ask(tuple,uint16[],uint256[]) → (bytes32)
- onFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)
- onOracleResult(bytes32,tuple,bytes)
Events3
- Answered(bytes32,uint16,uint16)
- Asked(bytes32,uint32,uint16,bytes32)
- Failed(bytes32,uint8,uint8,bytes32,uint16,uint16)
Errors9
- AddressEmptyCode(address)
- AddressInsufficientBalance(address)
- Declined()
- FailedInnerCall()
- InvalidSetup()
- NotClient()
- NotIntake()
- SafeERC20FailedOperation(address)
- TextTooLong()
ABI as JSON
[
{
"type": "constructor",
"inputs": [
{
"name": "intake_",
"type": "address",
"internalType": "contract IIntake"
},
{
"name": "imd_",
"type": "address",
"internalType": "contract IERC20"
},
{
"name": "attester_",
"type": "address",
"internalType": "address"
},
{
"name": "client_",
"type": "address",
"internalType": "contract ISwarmOracleClient"
},
{
"name": "rules_",
"type": "address",
"internalType": "contract SwarmRules"
},
{
"name": "price_",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"name": "AddressEmptyCode",
"type": "error",
"inputs": [
{
"name": "target",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "AddressInsufficientBalance",
"type": "error",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "Declined",
"type": "error",
"inputs": []
},
{
"name": "FailedInnerCall",
"type": "error",
"inputs": []
},
{
"name": "InvalidSetup",
"type": "error",
"inputs": []
},
{
"name": "NotClient",
"type": "error",
"inputs": []
},
{
"name": "NotIntake",
"type": "error",
"inputs": []
},
{
"name": "SafeERC20FailedOperation",
"type": "error",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "TextTooLong",
"type": "error",
"inputs": []
},
{
"name": "Answered",
"type": "event",
"inputs": [
{
"name": "id",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "move",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "agreed",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
}
],
"anonymous": false
},
{
"name": "Asked",
"type": "event",
"inputs": [
{
"name": "id",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "gameNo",
"type": "uint32",
"indexed": false,
"internalType": "uint32"
},
{
"name": "ply",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "questionHash",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"name": "Failed",
"type": "event",
"inputs": [
{
"name": "id",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "cause",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
},
{
"name": "status",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
},
{
"name": "reason",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
},
{
"name": "agreed",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "answered",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
}
],
"anonymous": false
},
{
"name": "ask",
"type": "function",
"inputs": [
{
"name": "g",
"type": "tuple",
"components": [
{
"name": "board",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "white",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "black",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "ply",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "quiet",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "gameNo",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "level",
"type": "uint8",
"internalType": "uint8"
}
],
"internalType": "struct SwarmRules.Game"
},
{
"name": "legal",
"type": "uint16[]",
"internalType": "uint16[]"
},
{
"name": "history",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"outputs": [
{
"name": "id",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "nonpayable"
},
{
"name": "asks",
"type": "function",
"inputs": [
{
"name": "turn",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "requestId",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "attester",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "client",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ISwarmOracleClient"
}
],
"stateMutability": "view"
},
{
"name": "decode",
"type": "function",
"inputs": [
{
"name": "x",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
},
{
"name": "",
"type": "uint16",
"internalType": "uint16"
}
],
"stateMutability": "pure"
},
{
"name": "digest",
"type": "function",
"inputs": [
{
"name": "a",
"type": "tuple",
"components": [
{
"name": "requestId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "chainId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "questionHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "answerType",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "answer",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "figure",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "fromBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "toBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "panelJobId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "panelSize",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "quorum",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "agreed",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "issuedAt",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "expiresAt",
"type": "uint64",
"internalType": "uint64"
}
],
"internalType": "struct Attestation"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "imd",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"name": "intake",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IIntake"
}
],
"stateMutability": "view"
},
{
"name": "onFailure",
"type": "function",
"inputs": [
{
"name": "id",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "status",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "reason",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "agreed",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "answered",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "onOracleResult",
"type": "function",
"inputs": [
{
"name": "id",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "a",
"type": "tuple",
"components": [
{
"name": "requestId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "chainId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "questionHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "answerType",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "answer",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "figure",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "fromBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "toBlock",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "panelJobId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "panelSize",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "quorum",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "agreed",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "issuedAt",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "expiresAt",
"type": "uint64",
"internalType": "uint64"
}
],
"internalType": "struct Attestation"
},
{
"name": "signature",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "pending",
"type": "function",
"inputs": [
{
"name": "requestId",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "questionHash",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "price",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "rules",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract SwarmRules"
}
],
"stateMutability": "view"
}
]Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.