Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/cre-sdk-examples/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
CRE_ETH_PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000001
# Profile to use for this environment (e.g. local-simulation, production, production-testnet)
CRE_TARGET=local-simulation
# This one will be used in PoR workflow
SECRET_ADDRESS_ALL=0x4700A50d858Cb281847ca4Ee0938F80DEfB3F1dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const BalanceReader = [
{
inputs: [{ internalType: 'address[]', name: 'addresses', type: 'address[]' }],
name: 'getNativeBalances',
outputs: [{ internalType: 'uint256[]', name: '', type: 'uint256[]' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'typeAndVersion',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const IERC165 = [
{
inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }],
name: 'supportsInterface',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
export const IERC20 = [
{
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: 'owner', 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: [],
name: 'totalSupply',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'recipient', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'transfer',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'sender', type: 'address' },
{ internalType: 'address', name: 'recipient', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'transferFrom',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const IReceiver = [
{
inputs: [
{ internalType: 'bytes', name: 'metadata', type: 'bytes' },
{ internalType: 'bytes', name: 'report', type: 'bytes' },
],
name: 'onReport',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }],
name: 'supportsInterface',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
export const IReceiverTemplate = [
{
inputs: [
{ internalType: 'address', name: 'received', type: 'address' },
{ internalType: 'address', name: 'expected', type: 'address' },
],
name: 'InvalidAuthor',
type: 'error',
},
{
inputs: [
{ internalType: 'bytes10', name: 'received', type: 'bytes10' },
{ internalType: 'bytes10', name: 'expected', type: 'bytes10' },
],
name: 'InvalidWorkflowName',
type: 'error',
},
{
inputs: [],
name: 'EXPECTED_AUTHOR',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'EXPECTED_WORKFLOW_NAME',
outputs: [{ internalType: 'bytes10', name: '', type: 'bytes10' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes', name: 'metadata', type: 'bytes' },
{ internalType: 'bytes', name: 'report', type: 'bytes' },
],
name: 'onReport',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }],
name: 'supportsInterface',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'pure',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export const IReserveManager = [
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'requestId',
type: 'uint256',
},
],
name: 'RequestReserveUpdate',
type: 'event',
},
{
inputs: [
{
components: [
{ internalType: 'uint256', name: 'totalMinted', type: 'uint256' },
{ internalType: 'uint256', name: 'totalReserve', type: 'uint256' },
],
internalType: 'struct UpdateReserves',
name: 'updateReserves',
type: 'tuple',
},
],
name: 'updateReserves',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const ITypeAndVersion = [
{
inputs: [],
name: 'typeAndVersion',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'pure',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
export const MessageEmitter = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'emitter',
type: 'address',
},
{
indexed: true,
internalType: 'uint256',
name: 'timestamp',
type: 'uint256',
},
{
indexed: false,
internalType: 'string',
name: 'message',
type: 'string',
},
],
name: 'MessageEmitted',
type: 'event',
},
{
inputs: [{ internalType: 'string', name: 'message', type: 'string' }],
name: 'emitMessage',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'emitter', type: 'address' }],
name: 'getLastMessage',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'emitter', type: 'address' },
{ internalType: 'uint256', name: 'timestamp', type: 'uint256' },
],
name: 'getMessage',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'typeAndVersion',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function',
},
] as const
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
export const ReserveManager = [
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'requestId',
type: 'uint256',
},
],
name: 'RequestReserveUpdate',
type: 'event',
},
{
inputs: [],
name: 'lastTotalMinted',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'lastTotalReserve',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
components: [
{ internalType: 'uint256', name: 'totalMinted', type: 'uint256' },
{ internalType: 'uint256', name: 'totalReserve', type: 'uint256' },
],
internalType: 'struct UpdateReserves',
name: 'updateReserves',
type: 'tuple',
},
],
name: 'updateReserves',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
] as const
Loading