diff --git a/starknet/src/utils/constants.cairo b/starknet/src/utils/constants.cairo index f18a5b48..252f117d 100644 --- a/starknet/src/utils/constants.cairo +++ b/starknet/src/utils/constants.cairo @@ -54,19 +54,18 @@ const STARKNET_MESSAGE: felt252 = 'StarkNet Message'; // H('StarkNetDomain(name:felt252,version:felt252,chainId:felt252,verifyingContract:ContractAddress)') const DOMAIN_TYPEHASH: felt252 = 0xa9974a36dee531bbc36aad5eeab4ade4df5ad388a296bb14d28ad4e9bf2164; -// H('Propose(space:ContractAddress,author:ContractAddress,executionStrategy:Strategy, -// userProposalValidationParams:felt*,metadatauri:felt*,salt:felt252)Strategy(address:felt252,params:felt*)') -const PROPOSE_TYPEHASH: felt252 = 0x248246f9067bb8dd7f7661e894ff088ed3e08cb0957df6cf9c9044cc71fffcb; +// H('Propose(space:ContractAddress,author:ContractAddress,executionStrategy:Strategy, userProposalValidationParams:felt*, +// metadataUri:felt*,salt:felt252)Strategy(address:felt252,params:felt*)') +const PROPOSE_TYPEHASH: felt252 = 0x1c363469fe163e6c76a850cf019c9c91740adbff5962889db4147507d7e1eb7; -// H('Vote(space:ContractAddress,voter:ContractAddress,proposalId:u256,choice:felt252, -// userVotingStrategies:IndexedStrategy*,metadatauri:felt*)IndexedStrategy(index:felt252,params:felt*) -// u256(low:felt252,high:felt252)') -const VOTE_TYPEHASH: felt252 = 0x3ef46c9599d94309c080fa67cc9f79a94483b2a3ac938a28bba717aca5e1983; +// H('Vote(space:ContractAddress,voter:ContractAddress,proposalId:u256,choice:felt252,userVotingStrategies:IndexedStrategy*, +// metadataUri:felt*)IndexedStrategy(index:felt252,params:felt*)u256(low:felt252,high:felt252)') +const VOTE_TYPEHASH: felt252 = 0x1d9763f87aaaeb271287d4b9c84053d3f201ad61efc2c32a0abfb8cd42347bf; // H('UpdateProposal(space:ContractAddress,author:ContractAddress,proposalId:u256,executionStrategy:Strategy, -// metadatauri:felt*,salt:felt252)Strategy(address:felt252,params:felt*)u256(low:felt252,high:felt252)') +// metadataUri:felt*,salt:felt252)Strategy(address:felt252,params:felt*)u256(low:felt252,high:felt252)') const UPDATE_PROPOSAL_TYPEHASH: felt252 = - 0x2dc58602de2862bc8c8dfae763fd5d754f9f4d0b5e6268a403783b7d9164c67; + 0x34f1b3fe98891caddfc18d9b8d3bee36be34145a6e9f7a7bb76a45038dda780; // H('Strategy(address:felt252,params:felt*)') const STRATEGY_TYPEHASH: felt252 = diff --git a/starknet/tests/types.ts b/starknet/tests/types.ts index 1d5613b7..49f82272 100644 --- a/starknet/tests/types.ts +++ b/starknet/tests/types.ts @@ -29,7 +29,7 @@ export const proposeTypes = { { name: 'author', type: 'ContractAddress' }, { name: 'executionStrategy', type: 'Strategy' }, { name: 'userProposalValidationParams', type: 'felt*' }, - { name: 'metadataURI', type: 'felt*' }, + { name: 'metadataUri', type: 'felt*' }, { name: 'salt', type: 'felt252' }, ], Strategy: sharedTypes.Strategy, @@ -43,7 +43,7 @@ export const voteTypes = { { name: 'proposalId', type: 'u256' }, { name: 'choice', type: 'felt252' }, { name: 'userVotingStrategies', type: 'IndexedStrategy*' }, - { name: 'metadataURI', type: 'felt*' }, + { name: 'metadataUri', type: 'felt*' }, ], IndexedStrategy: sharedTypes.IndexedStrategy, u256: sharedTypes.u256, @@ -56,7 +56,7 @@ export const updateProposalTypes = { { name: 'author', type: 'ContractAddress' }, { name: 'proposalId', type: 'u256' }, { name: 'executionStrategy', type: 'Strategy' }, - { name: 'metadataURI', type: 'felt*' }, + { name: 'metadataUri', type: 'felt*' }, { name: 'salt', type: 'felt252' }, ], Strategy: sharedTypes.Strategy,