Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cds-amal/50bd4f1322e68c107cfa892b801e7960 to your computer and use it in GitHub Desktop.
Save cds-amal/50bd4f1322e68c107cfa892b801e7960 to your computer and use it in GitHub Desktop.
const BigNumber = require("bignumber.js");
const txlog =
{
type: 'transaction',
actions: [
{
type: 'callexternal',
address: '0x62D0f3297d6D5F7e6b6434A3fFd6B5c4820eE45E',
contextHash: '0x4be60db92cada79b8066139b76b1cfb0319fbf46439ef2b7c575a4dd88480618',
value: BigNumber("0x0"),
kind: 'function',
isDelegate: false,
functionName: 'depositIntoExternalPool',
contractName: 'GoodGhosting',
arguments: [],
actions: [
{
type: 'callinternal',
actions: [],
functionName: 'paused',
contractName: 'Pausable',
arguments: [],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: { typeClass: 'bool', typeHint: 'bool' },
kind: 'value',
value: { asBoolean: false }
}
}
]
},
{
type: 'callinternal',
actions: [
{
type: 'callinternal',
actions: [
{
type: 'callinternal',
actions: [],
functionName: 'sub',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x60a8f5d8"),
rawAsBN: BigNumber("0x60a8f5d8")
}
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x60a8f46f"),
rawAsBN: BigNumber("0x60a8f46f")
}
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x169"), rawAsBN: BigNumber("0x169") }
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: 'div',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x169"), rawAsBN: BigNumber("0x169") }
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0xb4"), rawAsBN: BigNumber("0xb4") }
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x2"), rawAsBN: BigNumber("0x2") }
}
}
]
}
],
functionName: 'getCurrentSegment',
contractName: 'GoodGhosting',
arguments: [],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x2"), rawAsBN: BigNumber("0x2") }
}
}
]
}
],
functionName: 'isGameCompleted',
contractName: 'GoodGhosting',
arguments: [],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: { typeClass: 'bool', typeHint: 'bool' },
kind: 'value',
value: { asBoolean: false }
}
}
]
},
{
type: 'callinternal',
actions: [
{
type: 'callinternal',
actions: [],
functionName: 'sub',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x60a8f5d8"), rawAsBN: BigNumber("0x60a8f5d8") }
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x60a8f46f"), rawAsBN: BigNumber("0x60a8f46f") }
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x169"), rawAsBN: BigNumber("0x169") }
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: 'div',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x169"), rawAsBN: BigNumber("0x169") }
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0xb4"), rawAsBN: BigNumber("0xb4") }
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x2"), rawAsBN: BigNumber("0x2") }
}
}
]
}
],
functionName: 'getCurrentSegment',
contractName: 'GoodGhosting',
arguments: [],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: { asBN: BigNumber("0x2"), rawAsBN: BigNumber("0x2") }
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: 'sub',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: { asBN: BigNumber("0x2"), rawAsBN: BigNumber("0x2") }
}
},
{
name: 'b',
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: { asBN: BigNumber("0x1"), rawAsBN: BigNumber("0x1") }
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: { asBN: BigNumber("0x1"), rawAsBN: BigNumber("0x1") }
}
}
]
},
{
type: 'callexternal',
address: '0xFCe5eCDb579C8b8a37a1C92eF690c9E2ff76A213',
contextHash: '0x2181690f9fe98b4b237a4026f142ef947a191b1d924014d891cf7b40f89f544d',
value: BigNumber("0x0"),
kind: 'function',
isDelegate: false,
functionName: 'balanceOf',
contractName: 'MockERC20Mintable',
arguments: [
{
name: 'account',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x62D0f3297d6D5F7e6b6434A3fFd6B5c4820eE45E',
rawAsHex: '0x00000000000000000000000062d0f3297d6d5f7e6b6434a3ffd6b5c4820ee45e'
}
}
}
],
actions: [],
returnKind: 'return',
returnValues: [
{
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: 'sub',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: { asBN: BigNumber("0x2"), rawAsBN: BigNumber("0x2") }
}
},
{
name: 'b',
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: { asBN: BigNumber("0x1"), rawAsBN: BigNumber("0x1") }
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: { asBN: BigNumber("0x1"), rawAsBN: BigNumber("0x1") }
}
}
]
},
{
type: 'callexternal',
address: '0x38f2BDD1CecFF703498eAC8ce7dD30c56363c4c3',
contextHash: '0xa5d0f0cd4fd043c8edbe931400377de1c6af9e83b4e560e63b545c6f03dfbfa0',
value: BigNumber("0x0"),
kind: 'function',
isDelegate: false,
functionName: 'deposit',
contractName: 'LendingPoolAddressesProviderMock',
arguments: [
{
name: '_reserve',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0xFCe5eCDb579C8b8a37a1C92eF690c9E2ff76A213',
rawAsHex: '0x000000000000000000000000fce5ecdb579c8b8a37a1c92ef690c9e2ff76a213'
}
}
},
{
name: '_amount',
value: {
type: { typeClass: 'uint', bits: 256, typeHint: 'uint256' },
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
},
{
name: 'onBehalfOf',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x62D0f3297d6D5F7e6b6434A3fFd6B5c4820eE45E',
rawAsHex: '0x00000000000000000000000062d0f3297d6d5f7e6b6434a3ffd6b5c4820ee45e'
}
}
},
{
name: '_referralCode',
value: {
type: { typeClass: 'uint', bits: 16, typeHint: 'uint16' },
kind: 'value',
value: { asBN: BigNumber("0x9b"), rawAsBN: BigNumber("0x9b") }
}
}
],
actions: [
{
type: 'callexternal',
address: '0xFCe5eCDb579C8b8a37a1C92eF690c9E2ff76A213',
contextHash: '0x2181690f9fe98b4b237a4026f142ef947a191b1d924014d891cf7b40f89f544d',
value: BigNumber("0x0"),
kind: 'function',
isDelegate: false,
functionName: 'transferFrom',
contractName: 'MockERC20Mintable',
arguments: [
{
name: 'sender',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x62D0f3297d6D5F7e6b6434A3fFd6B5c4820eE45E',
rawAsHex: '0x00000000000000000000000062d0f3297d6d5f7e6b6434a3ffd6b5c4820ee45e'
}
}
},
{
name: 'recipient',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x38f2BDD1CecFF703498eAC8ce7dD30c56363c4c3',
rawAsHex: '0x00000000000000000000000038f2bdd1cecff703498eac8ce7dd30c56363c4c3'
}
}
},
{
name: 'amount',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
}
],
actions: [
{
type: 'callinternal',
actions: [
{
type: 'callinternal',
actions: [
{
type: 'callinternal',
actions: [],
functionName: 'sub',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
},
{
name: 'errorMessage',
value: {
type: {
typeClass: 'string',
location: 'memory',
typeHint: 'string'
},
kind: 'value',
value: {
kind: 'valid',
asString: 'ERC20: transfer amount exceeds balance'
}
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x0"), rawAsBN: BigNumber("0x0") }
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: 'add',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x1158e460913d00000"),
rawAsBN: BigNumber("0x1158e460913d00000")
}
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: '_msgSender',
contractName: 'Context',
arguments: [],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: true
},
kind: 'value',
value: {
asAddress: '0x38f2BDD1CecFF703498eAC8ce7dD30c56363c4c3',
rawAsHex: '0x00000000000000000000000038f2bdd1cecff703498eac8ce7dd30c56363c4c3'
}
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: '_msgSender',
contractName: 'Context',
arguments: [],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: true
},
kind: 'value',
value: {
asAddress: '0x38f2BDD1CecFF703498eAC8ce7dD30c56363c4c3',
rawAsHex: '0x00000000000000000000000038f2bdd1cecff703498eac8ce7dd30c56363c4c3'
}
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: 'sub',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0xffffffffffffffffffffffffffffffffffffffffffffffff7538dcfb7617ffff"),
rawAsBN: BigNumber("0xffffffffffffffffffffffffffffffffffffffffffffffff7538dcfb7617ffff")
}
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
},
{
name: 'errorMessage',
value: {
type: {
typeClass: 'string',
location: 'memory',
typeHint: 'string'
},
kind: 'value',
value: {
kind: 'valid',
asString: 'ERC20: transfer amount exceeds allowance'
}
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0xfffffffffffffffffffffffffffffffffffffffffffffffeea71b9f6ec2fffff"),
rawAsBN: BigNumber("0xfffffffffffffffffffffffffffffffffffffffffffffffeea71b9f6ec2fffff")
}
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: '_approve',
contractName: 'ERC20',
arguments: [
{
name: 'owner',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x0000000000000000000000008AC7230489e80000',
rawAsHex: '0x0000000000000000000000000000000000000000000000008ac7230489e80000'
}
}
},
{
name: 'spender',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x0000000000000000000000000000000000000000',
rawAsHex: '0x0000000000000000000000000000000000000000000000000000000000000000'
}
}
},
{
name: 'amount',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x44c"), rawAsBN: BigNumber("0x44c") }
}
}
],
returnKind: 'return'
}
],
functionName: '_beforeTokenTransfer',
contractName: 'ERC20',
arguments: [
{
name: 'from',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x38f2BDD1CecFF703498eAC8ce7dD30c56363c4c3',
rawAsHex: '0x00000000000000000000000038f2bdd1cecff703498eac8ce7dd30c56363c4c3'
}
}
},
{
name: 'to',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x0000000000000000000000008AC7230489e80000',
rawAsHex: '0x0000000000000000000000000000000000000000000000008ac7230489e80000'
}
}
},
{
name: 'amount',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x76d"), rawAsBN: BigNumber("0x76d") }
}
}
],
returnKind: 'unwind'
}
],
returnKind: 'unwind'
}
],
returnKind: 'unwind',
returnValues: [
{
value: {
type: { typeClass: 'bool', typeHint: 'bool' },
kind: 'value',
value: { asBoolean: true }
}
}
]
},
{
type: 'callinternal',
actions: [
{
type: 'callinternal',
actions: [
{
type: 'callinternal',
actions: [],
functionName: 'add',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x1158e460913d00000"),
rawAsBN: BigNumber("0x1158e460913d00000")
}
}
}
]
},
{
type: 'callinternal',
actions: [],
functionName: 'add',
contractName: 'SafeMath',
arguments: [
{
name: 'a',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
},
{
name: 'b',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x8ac7230489e80000"),
rawAsBN: BigNumber("0x8ac7230489e80000")
}
}
}
],
returnKind: 'return',
returnValues: [
{
name: undefined,
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: {
asBN: BigNumber("0x1158e460913d00000"),
rawAsBN: BigNumber("0x1158e460913d00000")
}
}
}
]
}
],
functionName: '_beforeTokenTransfer',
contractName: 'ERC20',
arguments: [
{
name: 'from',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x62D0f3297d6D5F7e6b6434A3fFd6B5c4820eE45E',
rawAsHex: '0x00000000000000000000000062d0f3297d6d5f7e6b6434a3ffd6b5c4820ee45e'
}
}
},
{
name: 'to',
value: {
type: {
typeClass: 'address',
kind: 'specific',
payable: false
},
kind: 'value',
value: {
asAddress: '0x0000000000000000000000008AC7230489e80000',
rawAsHex: '0x0000000000000000000000000000000000000000000000008ac7230489e80000'
}
}
},
{
name: 'amount',
value: {
type: {
typeClass: 'uint',
bits: 256,
typeHint: 'uint256'
},
kind: 'value',
value: { asBN: BigNumber("0x10ae"), rawAsBN: BigNumber("0x10ae") }
}
}
],
returnKind: 'return'
}
],
returnKind: 'unwind'
}
],
returnKind: 'unwind',
returnValues: []
}
],
returnValues: [],
returnKind: 'return'
}
],
origin: '0xf17f52151EbEF6C7334FAD080c5704D77216b732'
}
module.exports = txlog;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment