File tree Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 1919 - run : npm ci
2020 - run : npm run build --if-present
2121
22+ - uses : actions/upload-artifact@v2
23+ with :
24+ name : build
25+ path : dist
26+
2227 tests :
23- name : Run test
28+ strategy :
29+ max-parallel : 1 # needed until we get a seperate account for the rpc provider, until then running them in parallel would result in a nonce issue
30+ matrix :
31+ name : [sequencer-test, sequencer-goerli, rpc-goerli]
32+ include :
33+ - name : sequencer-test
34+ TEST_PROVIDER_BASE_URL : http://127.0.0.1:5050/
35+ - name : sequencer-goerli
36+ TEST_PROVIDER_BASE_URL : https://alpha4.starknet.io
37+ ENABLE_TEST_ACCOUNT_PRIVATE_KEY : true
38+ ENABLE_TEST_ACCOUNT_ADDRESS : true
39+ - name : rpc-goerli
40+ ENABLE_TEST_RPC_URL : true
41+ ENABLE_TEST_ACCOUNT_PRIVATE_KEY : true
42+ ENABLE_TEST_ACCOUNT_ADDRESS : true
43+
44+ name : Run test on ${{ matrix.name }}
2445 runs-on : ubuntu-latest
2546 needs : [build]
2647
3051 ports :
3152 - 5050:5050
3253 env :
33- TEST_PROVIDER_BASE_URL : http://127.0.0.1:5050/
54+ TEST_PROVIDER_BASE_URL : ${{ matrix.TEST_PROVIDER_BASE_URL }}
55+ TEST_RPC_URL : ${{ matrix.ENABLE_TEST_RPC_URL && secrets.TEST_RPC_URL }}
56+ TEST_ACCOUNT_PRIVATE_KEY : ${{ matrix.ENABLE_TEST_ACCOUNT_PRIVATE_KEY && secrets.TEST_ACCOUNT_PRIVATE_KEY }}
57+ TEST_ACCOUNT_ADDRESS : ${{ matrix.ENABLE_TEST_ACCOUNT_ADDRESS && secrets.TEST_ACCOUNT_ADDRESS }}
3458
3559 steps :
3660 - uses : actions/checkout@v2
Original file line number Diff line number Diff line change @@ -23,12 +23,15 @@ import { AccountInterface } from './interface';
2323export class Account extends Provider implements AccountInterface {
2424 public signer : SignerInterface ;
2525
26+ public address : string ;
27+
2628 constructor (
2729 providerOrOptions : ProviderOptions | ProviderInterface ,
28- public address : string ,
30+ address : string ,
2931 keyPairOrSigner : KeyPair | SignerInterface
3032 ) {
3133 super ( providerOrOptions ) ;
34+ this . address = address . toLowerCase ( ) ;
3235 this . signer =
3336 'getPubKey' in keyPairOrSigner ? keyPairOrSigner : new Signer ( keyPairOrSigner as KeyPair ) ;
3437 }
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ export class Contract implements ContractInterface {
125125 address : string ,
126126 providerOrAccount : ProviderInterface | AccountInterface = defaultProvider
127127 ) {
128- this . address = address ;
128+ this . address = address . toLowerCase ( ) ;
129129 this . providerOrAccount = providerOrAccount ;
130130 this . abi = abi ;
131131 this . structs = abi
You can’t perform that action at this time.
0 commit comments